package com.yishe.framework.ui.easyui;

public class Column {
	
	
	private String field;//
	private String title;//
	private short width;//
	private short rowspan = 1;//
	private short colspan = 1;//
	private String align = "center";//'left'，'right'，'center'
	private boolean sortable;//
	private boolean resizable;//（缩放） boolean（布尔型） 设置为true允许该列被缩放。 undefined 
	private boolean hidden;//（隐藏） boolean（布尔型） 设置为true将隐藏列。 undefined 
	private boolean checkbox;
	
	public Column() {	}
		
	public Column(String field,String title,short width) {
		this.title = title;
		this.field = field;
		this.width = width;
	}

	private Formatter formatter;
	public void setFormatter(Formatter formatter) {
		this.formatter = formatter;
	}
	public Formatter getFormatter() {
		return formatter;
	}
	public static interface Formatter{
		public String format(Object value,Object row,int index);
	}

	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public String getField() {
		return field;
	}
	public void setField(String field) {
		this.field = field;
	}
	public short getWidth() {
		return width;
	}
	public void setWidth(short width) {
		this.width = width;
	}
	public short getRowspan() {
		return rowspan;
	}
	public void setRowspan(short rowspan) {
		this.rowspan = rowspan;
	}
	public short getColspan() {
		return colspan;
	}
	public void setColspan(short colspan) {
		this.colspan = colspan;
	}
	public String getAlign() {
		return align;
	}
	public void setAlign(String align) {
		this.align = align;
	}
	public boolean isSortable() {
		return sortable;
	}
	public void setSortable(boolean sortable) {
		this.sortable = sortable;
	}
	public boolean isResizable() {
		return resizable;
	}
	public void setResizable(boolean resizable) {
		this.resizable = resizable;
	}
	public boolean isHidden() {
		return hidden;
	}
	public void setHidden(boolean hidden) {
		this.hidden = hidden;
	}
	public boolean isCheckbox() {
		return checkbox;
	}
	public void setCheckbox(boolean checkbox) {
		this.checkbox = checkbox;
	}
	
}
